package com.ECUT.javaSE.day2;

import java.util.Scanner;

public class practice9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //键盘输入4个整数，找出最小的那个数
        int[] nums = new int[4];
        for (int i = 0; i < nums.length; i++) {
            System.out.println("请输入第" + (i + 1) + "个整数：");
            nums[i] = sc.nextInt();
        }
        int min = nums[0];
        for (int num : nums) {
            if (num < min) {
                min = num;
            }
        }
        System.out.println("最小的数为：" + min);
    }
}
